//
//  DelayedActionCellController.m
//  TarPhone
//
//  Created by Christopher Anderson on 21/03/2009.
//  Copyright 2009 __MyCompanyName__. All rights reserved.
//

#import "DelayedActionCellController.h"


@implementation DelayedActionCellController

@synthesize queue;

- (id) init {
	self = [super init];
	if (self) {
		self.queue = [[NSOperationQueue alloc] init];
		[queue setMaxConcurrentOperationCount:1];
	}
	return self;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
	/*
	static NSString *cellIdentifier;
	
	if ([[queue operations] size] > 0) {
		cellIdentifier = @"LoadingTableCell"
	} else {
	}
	
	cell =  [tableView dequeueReusableCellWithIdentifier:cellIdentifier];
	if (cell == nil) {
        [[NSBundle mainBundle] loadNibNamed:cellIdentifier owner:self options:nil];
	}
	
	return cell;*/
}

- (NSOperation*) getOperation {
	return nil;
}

- (void) startBackgroundOperation {
	// Stop any exising actions
	[queue cancelAllOperations];
	
	NSOperation *op = [self getOperation];
	[queue addOperation:op];
	[op release];	
	
}

@end

